//============================================================================
// Name        : csiena
// Author      : Josh Lospinoso
// Copyright   : MIT License
// Description : Austere, limited implementation of the R package RSiena in
//				 C++. Used for fast maximum likelihood and method of moments
//				 estimation of stochastic actor oriented models (SAOMs)
//				 without any frills or user experience niceties.
//============================================================================


#ifndef CHAINELEMENT_H_
#define CHAINELEMENT_H_

#include "globals.h"
#include "digraph.h"
#include "evaluation.h"
#include "mersenneTwister.h"

namespace csiena {

class ChainElement {
public:
	ChainElement();
	virtual ~ChainElement();

	// Evaluation related methods
	virtual void evaluate(Digraph* x, Evaluation* f) = 0;
	virtual double evaluateProposal(Digraph* x, Evaluation* f) = 0;

	// Utility methods
	virtual bool isLink();
	virtual bool isCrimp();
	virtual void print(int index) = 0;

	// Accessor methods
	virtual double getScore(int thetaIndex) = 0;
	virtual double getInformation(int thetaIndex1, int thetaIndex2) = 0;
	virtual double getLogProbability() = 0;

	// Ingredients for chain
	ChainElement* previous;
	ChainElement* next;
};

}

#endif /* CHAINELEMENT_H_ */
